
package tankattack;

import java.applet.Applet;
import java.awt.Frame;
import java.awt.Graphics;
import gamepack.Game;
import tankattack.world.TankAttackWorld;
import gamepack.*; //comment later

// <applet code="TankAttackApp" width=600 height=400> </applet>

/*
 *  TankAttack.java
 *  This class is the starting point for the game.
 *  The game can be played either as an applet or as a frame.
 *
 *	@author Somanath
 *	@version 1.0
 *
*/

public class TankAttackApp extends Applet {
/**
 * RuntimeException requires this. (Prevents Warning during compilation)
 */
static final long serialVersionUID = 42L;

	public void init() 	{	 Game.init(600,400,this,null,null,Game.getDefaultPainter() );  new TankAttackWorld();  }
	//{	 Game.init(this,null);  new TankAttackWorld();  }
	//public void init() 	{	 *****************************************
	//	Application.initialize(600,400, new TankAttackWorld(), null);  
	//	new TankAttackWorld(); 
	//} ******************************************************************

	public void update(Graphics g) {}
	
	// Game.paint(g) has no use of 'g' if this application is a real game with backbuffer animation.
	public void paint(Graphics g) {	Game.paint(g); }  

	public static void main(String args[]) {
	
/* Preffered way - ***********************************************************
	Application.initialize( 600,400, new TankAttackApplet(), new Frame() ); //	{ Game.gback = Application.getgback();  
																			// Game.gfront = 	Application.getgFront() }
	new TankAttackWorld();
	// Use case for keeping multiple worlds instead of multiple games.
	//************************************************************************
*/	
		Game.init(600,400,new TankAttackApp(),new Frame(),null, Game.getDefaultPainter() );
		new TankAttackWorld();
	}
}









